// @ts-ignore
/* eslint-disable */
import request from '../utils/request.ts'

/** addRecord POST /api/record/add */
export async function addRecordUsingPost(
  body: API.RecordAddRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseLong_>('/api/record/add', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** deleteRecord POST /api/record/delete */
export async function deleteRecordUsingPost(
  body: API.DeleteRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/record/delete', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** editRecord POST /api/record/edit */
export async function editRecordUsingPost(
  body: API.RecordEditRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/record/edit', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** getRecordVOById GET /api/record/get/vo */
export async function getRecordVoByIdUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getRecordVOByIdUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseRecordVO_>('/api/record/get/vo', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** listRecordByPage POST /api/record/list/page */
export async function listRecordByPageUsingPost(
  body: API.RecordQueryRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageRecord_>('/api/record/list/page', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** listRecordVOByPage POST /api/record/list/page/vo */
export async function listRecordVoByPageUsingPost(
  body: API.RecordQueryRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageRecordVO_>('/api/record/list/page/vo', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** listMyRecordVOByPage POST /api/record/my/list/page/vo */
export async function listMyRecordVoByPageUsingPost(
  body: API.RecordQueryRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageRecordVO_>('/api/record/my/list/page/vo', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** listMyRecordHistoryVOByPage POST /api/record/my/list/page/vo/history */
export async function listMyRecordHistoryVoByPageUsingPost(
  body: API.RecordQueryRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageRecordVO_>('/api/record/my/list/page/vo/history', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** updateRecord POST /api/record/update */
export async function updateRecordUsingPost(
  body: API.RecordUpdateRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/record/update', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}
